﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace MVC.Core
{
    public class FengliulinResultFilterAttribute : ResultFilterAttribute
    {
        public string Val { get; set; }
        public FengliulinResultFilterAttribute()
        {
            
        }

        public FengliulinResultFilterAttribute(string val)
        {
            Val = val;
        }
      

        /// <summary>
        /// 执行之后
        /// </summary>
        /// <param name="context"></param>
        public override void OnResultExecuted(ResultExecutedContext context)
        {
            Console.WriteLine("OnResultExecuted");
        }

        /// <summary>
        /// 执行之前
        /// </summary>
        /// <param name="context"></param>
        public override void OnResultExecuting(ResultExecutingContext context)
        {
            Console.WriteLine("OnResultExecuted");
        }

    }
}
